package com.example.inter.tourdemo.adapter.homeadapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.inter.tourdemo.R;
import com.example.inter.tourdemo.bean.homebean.HomeChannelItem;

import java.util.List;


/**
 * https://github.com/CymChad/BaseRecyclerViewAdapterHelper
 */
public class HomechannelAdapter extends BaseQuickAdapter<HomeChannelItem, BaseViewHolder> {

    public HomechannelAdapter(int layoutResId, List data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, HomeChannelItem item) {
        helper.setText(R.id.text, item.getTitle());
        helper.setImageResource(R.id.icon, item.getImageResource());
    }
}
